package work.konbai.education.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 作业详情信息表
 *
 * @author KonBAI
 * @version 1.0
 * Create by 2021/3/4 11:22
 */
@Data
@TableName("min_homework_detail")
@ApiModel(value = "HomeworkDetail对象", description = "作业详情信息表")
public class HomeworkDetail implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@ApiModelProperty(value = "主键")
	@TableId(value = "id", type = IdType.ASSIGN_ID)
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;

	/**
	 * 作业表ID
	 */
	@NotNull(message = "请选择作业表")
	@ApiModelProperty(value = "作业表ID")
	private Long homeworkId;
	/**
	 * 学生ID
	 */
	@NotNull(message = "请选择学生")
	@ApiModelProperty(value = "学生ID")
	private Long studentId;

	/**
	 * 成绩
	 */
	@ApiModelProperty(value = "成绩")
	private BigDecimal score;
}
